import { RouteRecordRaw, RouterView } from 'vue-router'

import { redirectPath } from '../help'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/admin/activity-manage',
    component: RouterView,
    meta: { title: '活动管理', auth: ['admin-activity-manage-hit-contest-list'] },
    redirect: redirectPath,
    children: [
      {
        path: '/admin/activity-manage/hit-contest/list',
        component: () => import('@/views/admin/activity-manage/hit-contest/list.vue'),
        meta: { title: '打榜竞技', auth: ['admin-activity-manage-hit-contest-list'] }
      },
      {
        path: '/admin/activity-manage/hit-contest/add',
        component: () => import('@/views/admin/activity-manage/hit-contest/edit.vue'),
        meta: { title: '新建打榜竞技', auth: ['admin-activity-manage-hit-contest-list'] }
      }
    ]
  }
]

export default routes
